import React, { useState } from 'react';
import { Modal, Form, Input, Select } from 'antd';

const CreateProjectModal = () => {
  const [show, setShow] = useState(false);

  const onOk = () => {
    if (!show) {
      setShow(!show);
    }
  };

  return (
    <Modal
      title='创建项目'
      open={show}
      okText='创建项目'
      onOk={onOk}
      onCancel={oncancel}
    >
      <Form form={''}>
        <h2>请注册</h2>
        <p>账号注册</p>
        <Form.Item
          label='项目名称'
          name='name'
          rules={[{ required: true, message: '请输入项目名称' }]}
        >
          <Input />
        </Form.Item>
        <Form.Item
          label='所在部门'
          name='organization'
          rules={[{ required: true, message: '选择部门' }]}
        >
          <Select></Select>
        </Form.Item>
        <Form.Item
          label='负责人'
          name='owner'
          rules={[{ required: true, message: '选择负责人' }]}
        >
          <Select></Select>
        </Form.Item>
      </Form>
    </Modal>
  );
};

export default CreateProjectModal;
